package icu.guodapeng.website.controller

import icu.guodapeng.website.domain.user.dto.UserDto
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController
import icu.guodapeng.website.domain.user.holder.LoginUserHolder

import javax.annotation.Resource


@RestController
class UserController {
    @Resource
    lateinit var loginUserHolder: LoginUserHolder

    @GetMapping("/user/currentUser")
    fun currentUser(): UserDto {
        return loginUserHolder.getCurrentUser()
    }
}
